package 构造器模式;

public class NewConcretBuilder implements NewBuilder{

    private Product product = new Product();

    @Override
    public NewBuilder field1(String value) {
        product.setFile1(value);
        System.out.println("设置属性1");
        return this;
    }

    @Override
    public NewBuilder field2(String value) {
        product.setFile2(value);
        System.out.println("设置属性2");
        return this;
    }

    @Override
    public NewBuilder field3(String value) {
        product.setFile3(value);
        System.out.println("设置属性3");
        return this;
    }

    @Override
    public Product createProduct() {
        return product;
    }
}
